package com.rightsidetech.activity.mapper;

import com.rightsidetech.activity.dto.request.store.MtActivityActIdReq;
import com.rightsidetech.activity.dto.response.store.MtActivityCompareEndResp;
import com.rightsidetech.activity.dto.response.store.MtActivityEndInfoResp;
import com.rightsidetech.activity.dto.response.store.app.MtActivityOrderResp;
import com.rightsidetech.activity.dto.response.store.app.MtActivityRecordResp;
import com.rightsidetech.activity.entity.MtUserJoinActivityApply;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface MtUserJoinActivityApplyMapper {
    int deleteByPrimaryKey(Long id);

    int insert(MtUserJoinActivityApply record);

    int insertSelective(MtUserJoinActivityApply record);

    MtUserJoinActivityApply selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(MtUserJoinActivityApply record);

    int updateByPrimaryKey(MtUserJoinActivityApply record);

    MtUserJoinActivityApply selectByActIdAndUserId(@Param("actId") Long actId,@Param("userId") Long userId);

    int updateStatus(@Param("id") Long id,@Param("status")Byte status,@Param("rejectReason")String rejectReason);

    List<MtActivityRecordResp> selectRecordList(@Param("storeId") Long storeId,@Param("mold") String mold);

    List<MtActivityOrderResp> selectActOrderResp(Map<String, Object> map);

    List<MtActivityEndInfoResp> activityEndInfoPage(MtActivityActIdReq req);

    List<MtActivityEndInfoResp> activityCompareEndPage(@Param("req")MtActivityActIdReq req,@Param("top")Long top,@Param("areaId") List<Long> areaId);

    int updateStatusByActIdAndStoreId(@Param("actId") Long actId,@Param("storeId") Long storeId,@Param("status") Short status);

    List<MtUserJoinActivityApply> selectByActIdAndStatus(@Param("actId") Long actId, @Param("status") Byte status);

}